﻿<UserControl x:Class="TimeKeeper.Views.ProjectEditView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" MinWidth="240" MinHeight="150" Height="202" Width="304">
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBox}">
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="true">
                    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Row="0" Grid.Column="0" Text="Name: " HorizontalAlignment="Right" Margin="4" />
        <TextBox Grid.Row="0" Grid.Column="1" x:Name="Project_Name" Margin="4" />

        <TextBlock Grid.Row="1" Grid.Column="0" Text="Description: " HorizontalAlignment="Right" Margin="4" />
        <TextBox Grid.Row="1" Grid.Column="1" x:Name="Project_Description" TextWrapping="Wrap" Margin="4" />

        <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right">
            <Button x:Name="Ok" Content="Ok" Margin="4" Width="60"/>
            <Button x:Name="Cancel" Content="Cancel" Margin="4" Width="60"/>
        </StackPanel>
    </Grid>
</UserControl>
